package com.swu.pad.course.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.swu.pad.course.entity.CourseGroupUser;

public interface CourseGroupUserDao extends JpaRepository<CourseGroupUser, String> {

	public List<CourseGroupUser> findCourseGroupUserByCourseId(String courseId);
	public List<CourseGroupUser> findCourseGroupUserByCourseIdOrderByGroupNameAsc(String courseId);
	
	public List<CourseGroupUser> findCourseGroupUserByCourseIdAndGroupName(String courseId, String groupName);
	
	public List<CourseGroupUser> findCourseGroupUserByCourseIdAndGroupType(String courseId, String groupType);

	public List<CourseGroupUser> findCourseGroupUserByGroupId(String groupId);
	
	public CourseGroupUser findOneCourseGroupUserByGroupId(String groupId);
    
	
	
	public CourseGroupUser findCourseGroupUserByGroupIdAndUserId(String groupId, String userId);

	public CourseGroupUser findCourseGroupUserByCourseIdAndUserIdAndGroupType(String courseId, String userId, String groupType);
	
	public List<CourseGroupUser> findCourseGroupUsersByCourseIdAndUserIdAndGroupType(String courseId, String userId, String groupType);

	public List<CourseGroupUser> findCourseGroupUserByUserId(String userId);
	
	public CourseGroupUser findByUserIdAndGroupTypeAndCourseId(String UserId, String groupType,String courseId);
}
